package cn.edu.swpu.cins.u_chain.frontend.dao.project;

import cn.edu.swpu.cins.u_chain.frontend.entity.dto.project.ProAssessView;
import cn.edu.swpu.cins.u_chain.frontend.entity.dto.project.ProInfoView;
import cn.edu.swpu.cins.u_chain.frontend.entity.dto.project.ProSkillNeed;
import cn.edu.swpu.cins.u_chain.frontend.entity.persistence.project.ProInfo;
import cn.edu.swpu.cins.u_chain.frontend.entity.persistence.project.ProSkillsNeedInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ProjectDao {

    int insertProInfo(ProInfo proInfo);

    int insertProSkills(@Param("skillsNeedInfo") List<ProSkillsNeedInfo> skillsNeedInfo);

    ProInfo getProInfo(int proId);

    int updatePRDStatus(@Param("proId") int proId, @Param("path") String path);

    List<ProInfoView> getAllPros(@Param("limit") int limit, @Param("offset") int offset);

    List<ProSkillNeed> selectProSkillByProId(int proId);

    List<ProInfoView> selectProByUserId(@Param("userId") int userId,@Param("limit") int limit,@Param("offset") int offset);

    List<ProAssessView> selectProAssess(@Param("userId") int userId, @Param("limit") int limit, @Param("offset") int offset);

}
